package com.simba.server.controllers.impl;

import com.simba.server.components.CommandExecutor;
import org.apache.log4j.Logger;


import com.simba.common.log.LogUtil;

import com.simba.server.commands.impl.web.WebOBRStateCmd;
import com.simba.server.controllers.IOBRStatusController;

public class OBRStatusController implements IOBRStatusController
{
	private static final Logger logger = Logger.getLogger(OBRStatusController.class);

	@Override
	public void onOBRStateMessage(String status)
	{
		try
		{
			CommandExecutor.executorWebCommand(WebOBRStateCmd.NAME, status,false);
		}
		catch (Exception ex)
		{
			LogUtil.LogError(OBRStatusController.logger,
					"Handle OBR Status Message To Remote Handler Error -- Exception : " + ex);
		}
	}
}
